Skip to content

fix: set disableDefaultResponse for several Tuya switch modules#12538

Open
xuw wants to merge 1 commit into
Koenkk:masterfrom
xuw:tuya-switch-module-disable-default-response
Open

fix: set disableDefaultResponse for several Tuya switch modules#12538
xuw wants to merge 1 commit into
Koenkk:masterfrom
xuw:tuya-switch-module-disable-default-response

Conversation

@xuw

@xuw xuw commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

These Tuya switch modules — TS0001_switch_module, TS0002_basic, TS0003_switch_module_2, TS0004, TS0011 — frequently do not send a ZCL Default Response to on/off commands. With the default response expected, zigbee-herdsman waits the full 10 s command timeout for every command. Because commands to a device are serialized, this stacks badly when several gangs/lights are toggled in quick succession (a scene, or a multi-button scene switch): the lights appear to "hang" for many seconds even though the switch physically actuates.

Setting meta.disableDefaultResponse makes on/off fire-and-forget; the new state is still confirmed by the device's own attribute reports. This matches the existing TS0003 _TZ3000_ouwfc1qj variant, which already sets meta.disableDefaultResponse.

Verified on real _TZ3000_* / _TZ3210_* devices: the outgoing genOnOff command frame changes from disableDefaultResponse:false to true, the 10 s timeouts disappear, and attribute-report based state stays correct.

For the multi-endpoint definitions multiEndpoint is unchanged (TS0004 keeps it via deviceEndpoints).

Trade-off worth noting for reviewers: for any units of these models that do answer reliably, z2m will no longer surface a per-command failure (it relies on the attribute report instead). Given these modules are well-known unreliable responders, fire-and-forget is the better default — happy to scope this to specific manufacturerNames if preferred.

🤖 Generated with Claude Code

These Tuya switches (TS0001_switch_module, TS0002_basic,
TS0003_switch_module_2, TS0004, TS0011) frequently do not send a ZCL
Default Response to on/off commands. With the response expected,
zigbee-herdsman waits the full 10s command timeout for every command,
which serializes per device and stacks badly when several gangs/lights
are toggled in quick succession (e.g. via a scene or a multi-button
remote) - commands appear to "hang" for many seconds even though the
switch actuates.

Setting meta.disableDefaultResponse makes on/off fire-and-forget; the new
state is still confirmed by the device's own attribute reports. This is
consistent with the existing TS0003 "_TZ3000_ouwfc1qj" variant which
already sets meta.disableDefaultResponse.

Verified on real devices (_TZ3000_/_TZ3210_ family): the outgoing command
frame changes from disableDefaultResponse:false to true, the 10s timeouts
disappear, and attribute-report based state is unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@andrei-lazarov andrei-lazarov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given these modules are well-known unreliable responders, fire-and-forget is the better default — happy to scope this to specific manufacturerNames if preferred.

I haven't seen this issue before.. My modules respond correctly.
The fix should be specfic to the respective manufacturer names

But are you sure this isn't a problem with your setup? What is your coordinator model and version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants